package fr.cpe.j2ee.projet.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the ta_employee_conversation database table.
 * 
 */
@Embeddable
public class EmployeesConversationPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="emp_id", insertable=false, updatable=false)
	private int empId;

	@Column(name="con_id", insertable=false, updatable=false)
	private int conId;

	public EmployeesConversationPK() {
	}
	public int getEmpId() {
		return this.empId;
	}
	public void setEmpId(int empId) {
		this.empId = empId;
	}
	public int getConId() {
		return this.conId;
	}
	public void setConId(int conId) {
		this.conId = conId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof EmployeesConversationPK)) {
			return false;
		}
		EmployeesConversationPK castOther = (EmployeesConversationPK)other;
		return 
			(this.empId == castOther.empId)
			&& (this.conId == castOther.conId);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.empId;
		hash = hash * prime + this.conId;
		
		return hash;
	}
}